﻿<%@ Page Title="Ændre Password" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="changePassword.aspx.cs" Inherits="UCNKompetenceBors.User.changePassword" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="profileWrapper" class="contentSmallWrapper floatLeft">
        <div id="profileMenuWrapper" class="submenuBox floatLeft">
            <div class="subMenuBoxContent">
                <ul>
                    <li>
                        <asp:HyperLink ID="hyLinkProfile" runat="server" Text="Profil"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkEditProfile" runat="server" Text="Rediger Profil"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkChangePassword" runat="server" Text="Ændre Password" ForeColor="#FF9933"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkSettings" runat="server" Text="Instillinger"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkSale" runat="server" Text="Mine salg"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkPurchases" runat="server" Text="Mine køb"></asp:HyperLink></li>
                </ul>
            </div>
        </div>

        <div id="profileContentWrapper" class="contentBoxSmall floatLeft">
            <div id="changePasswordWrapper" class="floatLeft">
                <asp:Panel ID="panResetPasswordForm" runat="server">
                    <div class="inputFormSmall">
                        <div class="inputFormSmallLeft floatLeft">
                            <div class="inputFormSmallRow floatLeft">
                                <asp:Label ID="lblChangePassword" runat="server" CssClass="contentTitle" Text="Change Password"></asp:Label>
                            </div>
                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblCurrentPassword" runat="server" Text="Current Password: "></asp:Label>
                                </div>

                                <div class="inputFormSmallCellRight floatLeft">
                                    <asp:TextBox ID="txtCurrentPassword" runat="server" TextMode="Password"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalCurrentPassword" runat="server" ErrorMessage="Current password required" ToolTip="You need to enter a Current password" Text="*" Display="Dynamic" ControlToValidate="txtCurrentPassword" ForeColor="Red" ValidationGroup="ChangePassword"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblPassword" runat="server" Text="Password: "></asp:Label>
                                </div>

                                <div class="inputFormSmallCellRight floatLeft">
                                    <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="regexvalNewPasswordStrength" runat="server" ErrorMessage="New Password needs to be at least 8 characters long" ToolTip="Password needs to be at least 8 characters long" ValidationExpression="(\s*(\S)\s*){8,}" ControlToValidate="txtPassword" ValidationGroup="ChangePassword" Text="*" ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                                    <asp:RequiredFieldValidator ID="rfvalPassword" runat="server" ErrorMessage="New password required" ToolTip="You need to enter a new password" Text="*" Display="Dynamic" ControlToValidate="txtPassword" ValidationGroup="ChangePassword" ForeColor="Red"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblConfirmPassword" runat="server" Text="Confirm Password: "></asp:Label>
                                </div>

                                <div class="inputFormSmallCellRight floatLeft">
                                    <asp:TextBox ID="txtConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalConfirmPassword" runat="server" ErrorMessage="Confirm new password required" ToolTip="You need to confirm the new password" Text="*" Display="Dynamic" ControlToValidate="txtConfirmPassword" ValidationGroup="ChangePassword" ForeColor="Red"></asp:RequiredFieldValidator>
                                    <asp:CompareValidator ID="compvalConfirmPassword" runat="server" ErrorMessage="The passwords entered do not match" ToolTip="The passwords entered do not match" Text="*" ControlToValidate="txtConfirmPassword" ControlToCompare="txtPassword" Display="Dynamic" ValidationGroup="ChangePassword" ForeColor="Red"></asp:CompareValidator>
                                </div>
                            </div>
                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellRight floatLeft">
                                    <div id="changePasswordButton" class="floatRight">
                                        <asp:Button ID="btnChangePassword" runat="server" ValidationGroup="ChangePassword" Text="Reset Password" CssClass="button" OnClick="btnChangePassword_Click" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="inputFormSmallRight floatLeft">
                            <asp:ValidationSummary ID="valsumChangePassword" ValidationGroup="ChangePassword" ForeColor="Red" runat="server" />
                        </div>
                    </div>
                </asp:Panel>
                <div class="floatLeft">
                    <asp:Label ID="lblConfirm" runat="server"></asp:Label>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
